/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.operation.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 合成记录
 *
 * @author baogs
 * @date 2022-07-01 11:13:17
 */
@Data
@TableName("opt_compound_record")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "合成记录")
public class CompoundRecord extends Model<CompoundRecord> {

	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "id")
	private Long id;

	/**
	 * 合成需求id
	 */
	@ApiModelProperty(value = "合成需求id")
	private Long compoundDemandId;

	/**
	 * 用户id
	 */
	@ApiModelProperty(value = "用户id")
	private Long userId;

	/**
	 * 状态
	 */
	@ApiModelProperty(value = "状态[1:成功,2:正在合成上链]")
	private Integer status;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;


	/**
	 * 目标藏品
	 */
	@ApiModelProperty(value = "目标藏品")
	private Long targetSkuId;

	/**
	 * 目标藏品
	 */
	@ApiModelProperty(value = "目标藏品名称")
	private String targetSkuName;

	/**
	 * 目标藏品
	 */
	@ApiModelProperty(value = "目标藏品Token")
	private String targetSkuToken;

	/**
	 * 目标藏品
	 */
	@ApiModelProperty(value = "目标藏品图片")
	private String targetSkuImage;

	/**
	 * 目标藏品
	 */
	@ApiModelProperty(value = "目标藏品编码")
	private String targetSkuCode;

	/**
	 * 合成使用材料
	 */
	@TableField(exist = false)
	@ApiModelProperty(value = "合成使用材料")
	private List<CompoundRecordDetail> detailList;

	/**
	 * 交易Hash
	 */
	@ApiModelProperty(value = "交易Hash")
	private String txHash;

}
